function register() {
	var idUser = $('#username').val();
	var dateBirth = $('#birthdate').val();
	var fullName = $('#fullname').val();
	var password = $('#password').val();
	
 /*var json = {"idUser": idUser, "dateBirth": dateBirth, "fullName" :fullName, "password" :password};
  $.ajax({
	    url: "register.json",
	    type: 'POST',
	    dataType: 'json',
	    data: JSON.stringify(json),
	    contentType: 'application/json',
	    mimeType: 'application/json',
	    success: function(data) {
	    	alert("Server response: " + data.idUser);
	   	},
	    error: function() {
	    	alert("Error");
	    }
	}); 	*/
	
	  /*$.ajax({
		    url: "register/" + username + "/" + password + "/" + fullName + "/" + dateBirth,
		    type: 'GET',
		    dataType: 'json',
		    data: JSON.stringify(json),
		    contentType: 'application/json',
		    mimeType: 'application/json',
		    success: function(data) {
		    	alert("Server response: " + data.idUser);
		   	},
		    error: function() {
		    	alert("Error");
		    }
		}); 
	  */
	  $.getJSON("register/" + idUser + "/" + password + "/" + fullName + "/" + dateBirth + ".json",{ajax : 'true'},
				function(data) {
		  alert("Server response: " + data.idUser);
		});
}

function updateProfile(){
	var fullName = $('#fullname').val();
	var password = $('#password').val();
	 $.getJSON("updateuser/" + password + "/" + fullName + ".json",{ajax : 'true'},
				function(data) {
		  alert("Server response: " + data.idUser);
		});
}